package com.zengjianjun.storm.demo.wordcount;

import com.zengjianjun.storm.demo.StormDemoApplication;
import org.apache.storm.topology.base.BaseRichSpout;
import org.springframework.beans.factory.annotation.Value;

/**
 * @author zengjianjun
 */
public abstract class AbstractBaseRichSpout extends BaseRichSpout {

    @Value("${storm.local:false}")
    private boolean stormLocal;


    protected void run() {
        if (!stormLocal) {
            StormDemoApplication.start();
        }
    }
}
